Hello and welcome to this demonstration on
using anchors in studio. Anchors are used for making
the selectors more reliable. In this video, a workflow
will be created using rpahallenge.com as a
website. Let's begin. Search for an open
browser activity in the activities panel and drag and drop it in
the designer panel. A sequence is
automatically created when the input dialog activity is dropped in the
designer panel. Let's rename the
sequence activity and add an annotation to it, rename the open
browser activity, in double-quotes,
enter the website URL www.rpachallenge.com
in the URL text area of the open browser activity, navigate to the
properties panel of the open browser activity and select "Edge from
the browser type drop-down menu," now, click "Save" to
save the project, and select "Run" from
the debug file menu on the design ribbon
to run the project. Notice the location of company
name field in the form. Its location changes every time this webpage is refreshed. Now, go back to the
workflow which was built, search for a type into
activity and drag and drop it in the Do container of the open browser activity, rename the activity, click "Indicate element
inside browser link" and indicate input field of company name label
on the website, insert text UiPath and the input field of
type into activity, run the project again. Notice that the location of the company named
field has changed, also the execution is taking longer than usual
because the process is facing difficulty in
finding the company name due to the change in its
location on the screen. Wait for a few seconds. Now, you can see that UI element not found error
appears on the screen. Click "Okay" on the
error pop-up window. To solve this problem, an anchor based
activity is used. It will help the process to find the selector even when
it changes its location. Delete the type into activity, search for an anchor
based activity and drag and drop it
in the Do container, rename the anchor
based activity, now, search for a fined
element activity in the anchor area of the
anchor based activity, rename the activity, click "indicate
element inside browser link" and indicate the label
company name as the anchor. Next, search for a type
into activity and drag and drop it in the action
activity area and rename it, click "indicate
element inside browser link" and indicate the input
field of company name, insert text UiPath and the input field of the
type into activity, now, click "Save" to save
the project and run it. You can see that the position of the company name
field changed again, but the process succeeds in inserting the required
texts in the field. This is the benefit
of using anchors. It is encouraged to follow the steps as described
above to increase the reliability of selectors
in studio by using anchors. Thank you for watching.